/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Modele;

import java.util.*;

/**
 *
 * @author Gloire
 */
public class Case {
    private char valeur;
    private boolean visitee;
    private ArrayList<Case> voisins;
    private int points;
    
    public Case(char c, int pts){
        this.valeur = c;
        this.visitee = false;
        this.voisins = new ArrayList();
        this.points = pts;
    }
    
    public char getValeur(){
        return this.valeur;
    }
    
    public int getPoints(){
        return this.points;
    }
    
    public boolean estVisitee(){
        return this.visitee;
    }
    
    public void setValeur(char c){
        this.valeur = c;
    }
    
    public void setPoints(int pts){
        this.points = pts;
    }
    
    public void setVisitee(boolean b){
        this.visitee = b;
    }
    
    public ArrayList<Case> getVoisins(){
        return this.voisins;
    }
    
    public boolean estVoisin(Case c){
        if(c == null)
            return false;
        if(this.voisins.contains(c))
            return true;
        return false;
    }
    
    @Override
    public String toString(){
        return this.valeur + "";
    }
}
